#include <iostream>
#include <stdio.h>
#include "../inc/Point.h"

using namespace std;

Point::Point (void)
{
		X = 0;
		Y = 0; 
		Z = 0;
		R = 0;
		G = 0; 
		B = 0;
}		

Point::Point(float _x, float _y, float _z, float _r, float _g, float _b)
{
		X = _x; 
		Y = _y; 
		Z = _z;
		R = _r;
		G = _g; 
		B = _b;
}

Point::Point(const Point &_p)
{
        this->X = _p.X;
        this->Y = _p.Y;
        this->Z = _p.Z;
		this->R = _p.R;
        this->G = _p.G;
        this->B = _p.B;
}

Point::~Point()	{}

void Point::setX(float _x)
{
		this->X = _x;
}

void Point::setY(float _y)
{
		this->Y = _y;
}

void Point::setZ(float _z)
{
		this->Z = _z;
}

void Point::setXYZ(float _x, float _y, float _z)
{
        this->X = _x;
        this->Y = _y;
        this->Z = _z;
}

void Point::setR(float _r)
{
		this->R = _r;
}

void Point::setG(float _g)
{
		this->G = _g;
}

void Point::setB(float _b)
{
		this->B = _b;
}

void Point::setRGB(float _r, float _g, float _b)
{
        this->R = _r;
        this->G = _g;
        this->B = _b;
}

float Point::getX()
{
		return this->X;
}

float Point::getY()
{
		return this->Y;
}

float Point::getZ()
{
		return this->Z;
}

float Point::getR()
{
		return this->R;
}

float Point::getG()
{
		return this->G;
}

float Point::getB()
{
		return this->B;
}

Point &Point::operator= (const Point &_p)
{
        this->X = _p.X;
        this->Y = _p.Y;
        this->Z = _p.Z;
        return (*this);
}

bool Point::operator== (const Point & _p)
{
        bool res = false;
        if(this->X == _p.X && this->Y == _p.Y && this->Z == _p.Z)
        {
                res = true;
        }
        return res;
}

bool Point::operator!= (const Point & _p)
{
	bool res = false;
	if(this->X != _p.X || this->Y != _p.Y || this->Z != _p.Z)
	{
		res = true;
	}
	return res;
}

void Point::printPoint()
{
	cout<<"x,y,z : "<<X<<" "<<Y<<" "<<Z<<" || r,g,b : "<<R<<" "<<G<<" "<<B<<endl;
}
